home *** CD-ROM | disk | FTP | other *** search
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="text" />
-
- <xsl:template match="/">Mary:
- <xsl:call-template name="whoIs">
- <xsl:with-param name="aGirl" select="'Mary'" />
- </xsl:call-template>
-
- Ann:
- <xsl:call-template name="whoIs">
- <xsl:with-param name="aGirl" select="'Ann'" />
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template name="whoIs">
- <xsl:param name="aGirl" select="someName" />
-
- <xsl:value-of
- select="concat(substring('My girlfriend', 1 div ($aGirl = 'Mary')),
- substring('Some other girl', 1 div not(($aGirl = 'Mary'))))" />
- </xsl:template>
- </xsl:stylesheet>
-